#include <iostream>
#include <vector>
#define LL long long
using namespace std;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  LL n, s;
  cin >> n;
  s = (n + 1) * n / 2;
  if (s % 2 == 1) {
    cout << "NO\n";
  } else {
    s /= 2;
    vector<int> ans1, ans2;
    for (int i = n; i >= 1; i--) {
      if (s >= i) {
        s -= i;
        ans1.push_back(i);
      } else {
        ans2.push_back(i);
      }
    }
    cout << "YES\n";
    cout << ans1.size() << "\n";
    for (int x : ans1) {
      cout << x << " ";
    }
    cout << "\n"
         << ans2.size() << "\n";
    for (int x : ans2) {
      cout << x << " ";
    }
    cout << "\n";
  }
  return 0;
}